﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WindowsFormsApplication1
{
    public class UserInfo
    {
        private int userID;
        private eUserTypes userType;
        private String firstName;
        private String lastName;
        private long PESEL;

        public UserInfo(int _userID, int _userType, String _firstName, String _lastName, long _PESEL)
        {
            userID = _userID;
            firstName = _firstName;
            lastName = _lastName;
            PESEL = _PESEL;

            switch (_userType)
            {
                case 1: userType = eUserTypes.USER_RECEPTION; break;
                case 2: userType = eUserTypes.USER_DOCTOR; break;
                case 3: userType = eUserTypes.USER_ADMINISTRATOR; break;
                case 0:
                default:
                    userType = eUserTypes.USER_NOPRIVILEDGES; break;
            }
        }

        public String GetFullUserString()
        {
            return userID + ": " + firstName + " " + lastName + " [" + userType.ToString() + "] ( PESEL: " + PESEL + ")";
        }

        public String GetNameString()
        {
            return firstName + " " + lastName;
        }

        public eUserTypes GetUserType()
        {
            return userType;
        }
    }

    public enum eUserTypes
    {
        USER_NOPRIVILEDGES,
        USER_RECEPTION,
        USER_DOCTOR,
        USER_ADMINISTRATOR
    }
}
